<%@ page language="java" pageEncoding="utf-8" %>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w" %>

<div class="easyui-panel" data-options="doSize:false,layoutH:47,border:false" style="margin:5px">
    <form method="post" action="/floor/UiFloorPanelPage@editPanel.page" class="pageForm">
        <w:hidden bind="bean.id"/>
        <div class="ui-formContent">
            <p>
                <label style="width:130px;text-align:right">楼层标题：</label>
                <w:text bind="bean.title" style="width:300px;" styleClass="easyui-validatebox" dataOptions="required:true"/>
            </p>
            <p>
                <label style="width:130px;text-align:right">标题栏模式：</label>
                <select name="bean.title_mode">
                    <w:option bind="bean.title_mode" value="LEFT_AND_MORE">标题居左更多居右</w:option>
                    <w:option bind="bean.title_mode" value="CENTER_NO_MORE">标题居中隐藏更多</w:option>
                    <w:option bind="bean.title_mode" value="LEFT_NO_MORE">标题居左隐藏更多</w:option>
                    <w:option bind="bean.title_mode" value="NO_TITLE_MORE">隐藏标题隐藏更多</w:option>
                </select>
            </p>
            <p>
                <label style="width:130px;text-align:right">标题图片：</label>
                <w:text bind="bean.image" style="width:242px;" dataOptions="required:true"/><a href="javascript:;" class="easyui-linkbutton"
                                                                   onclick="seltitleimg()">选择</a>
            </p>
            <p>
                <label style="width:130px;text-align:right">面板颜色：</label>
                <w:text bind="bean.color" style="width:300px;" styleClass="easyui-validatebox" dataOptions="required:true"/>
            <p style="width:330px;text-align:right;color: red;height: 12px">注:颜色填写格式如"#999999"</p>
            </p>
            <p>
                <label style="width:130px;text-align:right">面板链接：</label>
                <w:text bind="bean.link" style="width:300px;" styleClass="easyui-validatebox" dataOptions="required:true"/>
            </p>
            <p>
                <label style="width:130px;text-align:right">面板布局：</label>
                <select name="bean.layout">
                    <w:option bind="bean.layout" value="WE_LEFT_ONE_RIGHT_TWO">[微商城]左一右二布局</w:option>
                    <w:option bind="bean.layout" value="WE_LEFT_ONE_RIGHT_FOUR">[微商城]左一右四布局</w:option>
                    <w:option bind="bean.layout" value="WE_LEFT_TWO_RIGHT_ONE">[微商城]左二右一布局</w:option>
                    <w:option bind="bean.layout" value="WE_TWO_COLUMN">[微商城]两列布局</w:option>
                    <w:option bind="bean.layout" value="WE_FOUR_COLUMN">[微商城]四列布局</w:option>
                </select>
            </p>
            <p>
                <label style="width:130px;text-align:right">面板类型：</label>
                <select name="bean.type">
                    <w:option bind="bean.type" value="ITEM">链图模式</w:option>
                    <w:option bind="bean.type" value="PRODUCT">商品列表</w:option>
                </select>
            </p>
            <p>
                <label style="width:130px;text-align:right">排序：</label>
                <w:text bind="bean.sort_value" style="width:300px;" styleClass="easyui-validatebox" dataOptions="required:true"/>
            </p>
        </div>
    </form>
</div>
<div class="ui-buttonBar">
    <a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="uifloorAdd();">保 存</a>
    <a href="javascript:;" class="easyui-linkbutton" iconCls="icon_cancel" onclick="$w.closeCurrWin()">取 消</a>
</div>
<script>
    function uifloorAdd() {
        $w.doWinForm()
    }
</script>
<script>
    function seltitleimg() {
        var str = ctx + "/platform/upload/UploadPage.page?rootPath=info&fileName=" + $("input[name='bean.image']").val();
        window.parent.parent.$w.openDialog({
            url: str, title: "选择图片", w: 700, h: 420, afterClose: function (revalue) {
                if (revalue && revalue.fileName) {
                    $("input[name='bean.image']").val(revalue.filePath + revalue.fileName);

                }
            }
        });
    }
</script>